Skip to contentSkip to conversation

GPU hang on AMD Raven

Bug 108261 [email protected] 1 participant 6 messages Oct 6, 2018 – Sep 25, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=108261

Bug ID: 108261
Summary: [amdgpu][GL_ARB_bindless_texture][opengl 4] GPU hang
on AMD Raven
Product: Mesa
Version: git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/radeonsi
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]

GPU hang appears when trying to render scene to FBO (framebuffer object) with attached texture with resident handle, but if all the handles of attached texture are not reesident (or if there is no handles), hang disappears. For example this pseudocode causes GPU hang:
GLuint renderbufId;
glCreateRenderbuffers(1, &renderbufId); glNamedRenderbufferStorage(renderbufId, GL_DEPTH_COMPONENT, width(),
height());

  GLuint texId;
  glCreateTextures(GL_TEXTURE_2D, 1, &texId);
  glTextureStorage2D(texId, 1, GL_RGBA8, width(), height());

  GLuint64 handle = glGetTextureHandleARB(texId);
  glMakeTextureHandleResidentARB(handle);

glBindFramebuffer(GL_FRAMEBUFFER, fboID); glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, texId, 0); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
GL_RENDERBUFFER, rboId);
//render some triangles
glBindFramebuffer(GL_FRAMEBUFFER, 0);
//render main scene
glSwapBuffers();

And this not:
GLuint renderbufId;
glCreateRenderbuffers(1, &renderbufId); glNamedRenderbufferStorage(renderbufId, GL_DEPTH_COMPONENT, width(),
height());

  GLuint texId;
  glCreateTextures(GL_TEXTURE_2D, 1, &texId);
  glTextureStorage2D(texId, 1, GL_RGBA8, width(), height());

  GLuint64 handle = glGetTextureHandleARB(texId);
  std::cout << handle << std::endl; //prevent optimizing out

glBindFramebuffer(GL_FRAMEBUFFER, fboID); glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, texId, 0); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
GL_RENDERBUFFER, rboId);
//render some triangles
glBindFramebuffer(GL_FRAMEBUFFER, 0);
//render main scene
glSwapBuffers();

I can try to write full cpp sample for exposing the hang, if it's needed. There is already open source graphic engine (my "pet" project) affected by the hang, but code is quite complex (https://gitlab.com/KawaiiGraphics/Kawaii3D
https://gitlab.com/KawaiiGraphics/Misaka3D ;
workaround added in commit b53d98dacff2b0392c2143c8901289e93ddd8623, so only previous versions are affected).

My hardware:
APU: AMD Ryzen 5 2400G (with integrated GPU Radeon Vega 11 Graphics) System board: MSI AM4 X470 Gaming Pro
RAM: Goodram Iridium 16Gb (8+8 Gb dual-channel 2800MHz)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=108261

--- Comment #1 from [email protected] ---

Quoted 1 line

workaround added in commit b53d98dacff2b0392c2143c8901289e93ddd8623, so only previous versions are affected

this about https://gitlab.com/KawaiiGraphics/Misaka3D

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=108261

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------

                 OS|All                         |Linux (All)
           Hardware|Other                       |x86-64 (AMD64)
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=108261

Domen <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

           See Also|                            |https://bugs.freedesktop.or
                   |                            |g/show_bug.cgi?id=108814
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=108261

GitLab Migration User <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |MOVED

--- Comment #3 from GitLab Migration User <[email protected]> --- -- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1331.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel